package cn.wolfcode.service.impl;

import cn.wolfcode.domain.Log;
import cn.wolfcode.mapper.LogMapper;
import cn.wolfcode.service.ILogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LogServiceImpl implements ILogService {

    @Autowired
    private LogMapper logMapper;


    @Override
    public void save(Log log) {
        logMapper.insert(log);
    }

    @Override
    public void delete(Long id) {
        logMapper.deleteByPrimaryKey(id);
    }

    @Override
    public void update(Log log) {
        logMapper.updateByPrimaryKey(log);
    }

    @Override
    public Log get(Long id) {
        return logMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Log> listAll() {
        return logMapper.selectAll();
    }

}
